// poj1324
// 题意：给定一个n*m(n, m<=20)的棋盘，有一些格子不能走，然后现在给定一条
//       长度为l(2<=l<=8)的蛇，蛇都是由相邻方块构成，不重叠。
//       现在每次可以将蛇移动一个单位，就是将头超相邻空的单位移动一格，
//       整个身体都依次前移一格。问最后蛇的头想到(1, 1)最少需要几步，
//       如果不能到达就输出-1。
//
// 题解：用A*算法，我们先将当前蛇的局面记录下来，可以记录一个头坐标，以及
//       从头到尾的所有方向，只需要4^8就行。然后对于当前局面，我们记录
//       dis为已经走的距离，vdis为从头这个位置，不考虑身体存在到(1, 1)的
//       最短距离，我们我每次用启发函数h(state)=dis+vdis，不断选取小的
//       往外搜。
//
//       不太会严格证明...但是感觉是没错的
//
// run: time -p $exec < input
#include <iostream>
#include <vector>
#include <utility>
#include <queue>

int const maxn = 30;
int const opt[4][2] = {{1, 0}, {0, 1}, {-1, 0}, {0, -1}};
bool stone[maxn][maxn];
int dis[maxn][maxn];
int body[maxn][maxn];
int res[64 * 64 * 4][21 * 21];
int rtick;
int btick = 1;
std::vector<std::pair<int, int> > all_stone(maxn * maxn);
std::vector<std::pair<int, int> > snake(maxn);
int n, m, l, k;

struct state
{
	state() { dis = dir = 0; }
	int dis, x, y, dir;
};

bool inrange(int x, int y)
{
	return (1 <= x && x <= n) && (1 <= y && y <= m);
}

bool inrange(std::pair<int, int> const & a)
{
	return (1 <= a.first && a.first <= n) && (1 <= a.second && a.second <= m);
}

bool operator<(state const & a, state const & b)
{
	return a.dis + dis[a.x][a.y] > b.dis + dis[b.x][b.y];
}

bool not_touch_stone(int x, int y)
{
	return !stone[x][y];
}

void init()
{
	rtick++;
	for (int i = 1; i <= n; i++)
		for (int j = 1; j <= m; j++) stone[i][j] = false;
}

void init_bfs()
{
	bool vis[n + 1][m + 1];
	for (int i = 1; i <= n; i++)
		for (int j = 1; j <= m; j++) vis[i][j] = false;
	for (int i = 0; i < k; i++) vis[all_stone[i].first][all_stone[i].second] = true;
	typedef std::pair<int, std::pair<int, int> > state_type;
	state_type start;
	for (int i = 1; i <= n; i++)
		for (int j = 1; j <= m; j++) dis[i][j] = -1;
	dis[1][1] = 0;
	start.second = std::make_pair(1, 1); start.first = 0;
	std::queue<state_type> q;
	q.push(start);
	while (!q.empty()) {
		state_type now = q.front(); q.pop();
		state_type tmp = now; tmp.first++;
		for (int i = 0; i < 4; i++) {
			tmp.second = now.second;
			tmp.second.first += opt[i][0];
			tmp.second.second += opt[i][1];
			if (inrange(tmp.second) && !vis[tmp.second.first][tmp.second.second]) {
				vis[tmp.second.first][tmp.second.second] = true;
				dis[tmp.second.first][tmp.second.second] = tmp.first;
				q.push(tmp);
			}
		}
	}
}

int main()
{
	std::ios::sync_with_stdio(false);
	for (int ti = 1; std::cin >> n >> m >> l && (n || m || l); ti++) {
		init();
		std::cout << "Case " << ti << ": ";
		state start;
		for (int i = 0; i < l; i++)
			std::cin >> snake[i].first >> snake[i].second;
		start.x = snake[0].first;
		start.y = snake[0].second;
		for (int i = l - 1; i; i--)
			for (int j = 0; j < 4; j++)
				if (snake[i].first - opt[j][0] == snake[i - 1].first &&
						snake[i].second - opt[j][1] == snake[i - 1].second)
					start.dir = (4 * start.dir + j);
		std::cin >> k;
		for (int i = 0, x, y; i < k; i++) {
			std::cin >> x >> y;
			all_stone[i].first = x;
			all_stone[i].second = y;
			stone[x][y] = true;
		}

		if (start.x == 1 && start.y == 1) {
			std::cout << "0\n";
			continue;
		}

		init_bfs();
		if (dis[start.x][start.y] == -1) {
			std::cout << "-1\n";
			continue;
		}

		std::priority_queue<state> pq;
		pq.push(start);
		bool ok = true;
		while (!pq.empty()) {
			state now = pq.top(); pq.pop();
			if (res[now.dir][(now.x - 1) * 20 + now.y - 1] == rtick) continue;
			btick++;
			res[now.dir][(now.x - 1) * 20 + now.y - 1] = rtick;
		//	std::cout << "head: " << now.x << ' ' << now.y << ' ' << now.dis << '\n';
			if (now.x == 1 && now.y == 1) {
				std::cout << now.dis << '\n';
				ok = false;
				break;
			}
			int x = now.x, y = now.y, d = now.dir;
			body[x][y] = btick;
			for (int i = 0; i < l - 1; i++, d /= 4) {
				x += opt[d % 4][0]; y += opt[d % 4][1];
			//	std::cout << x << ' ' << y << '\n';
				body[x][y] = btick;
			}
			for (int i = 0; i < 4; i++) {
				state tmp = now; tmp.dis++;
				tmp.x -= opt[i][0];
				tmp.y -= opt[i][1];
				if (inrange(tmp.x, tmp.y) && body[tmp.x][tmp.y] != btick && not_touch_stone(tmp.x, tmp.y)) {
					tmp.dir %= (1 << (2 * (l - 2)));
					tmp.dir = (tmp.dir * 4 + i);
					if (res[tmp.dir][(tmp.x - 1) * 20 + tmp.y - 1] != rtick)
						pq.push(tmp);
				}
			}
		}
		if (ok) std::cout << "-1\n";
	}
}

